﻿using System;
using System.Collections.Generic;

namespace ConsoleApp1
{
    class ArrayList
    {
        //public string China;
        //public int i;
        public static void Main(string[]args)
        {

            List<string> list = new List<string> { };
            List<string> list1 = new List<string> { };

            //ArrayList al = new ArrayList();
            
            list.Add("Minxi");
            list.Add("Vocational");
            list.Add("Technology shool"); 
            list.Sort();
            
            list1.Add("Minxi");
            list1.Add("Longyan");
            list1.Add("University");
            list1.Sort();

            List<string> s = new List<string> {"M","i","n","X","i" };
            List<string> s1 = new List<string> { "L","o","n","g","Y","a","n" };
            for(int a = 0; a <= 4; a++)
            {
                Console.WriteLine(s[a]);                        
            }
            
            if(s.Count <= s.Capacity)
            {
                Console.WriteLine(s.Capacity);
            }
            else
            {
                Console.WriteLine(s.Count);
            }
            Console.WriteLine("\n");
            for( int b = 0; b <= 6; b++)
            {
                Console.WriteLine(s1[b]);
            }
            if(s1.Count <= s1.Capacity)
            {
                Console.WriteLine(s1.Capacity);
            }
            else
            {
                Console.WriteLine(s1.Count);
            }
            Console.WriteLine("\n");


            
            
            //list.Contains("abc");
            //list.Contains("abc");
            
            foreach (string i in list)
            {
                Console.WriteLine(i + "");
            }
            foreach (string j in list)
            {
                Console.WriteLine(list.Contains("abc"));
            }
            Console.WriteLine("\n");
            foreach (string k in list1)
            {
                Console.WriteLine(k+"");
            }
            foreach(string l in list1)
            {
                Console.WriteLine(list1.Contains("abc"));
            }
            
            
            
         }

    }

        
    
}
